#ifndef SEARCHLIST_H
#define SEARCHLIST_H
#include<QListWidget>
#include<QEvent>
#include<QListWidgetItem>
#include<QDialog>
#include<QSize>
#include<QByteArray>
#include"loadingdlg.h"
#include"global.h"
#include"userdata.h"
class SearchList:public QListWidget
{
    Q_OBJECT
public:
    SearchList(QWidget*parent=nullptr);
    void CloseFindDlg();
    void SetSearchEdit(QWidget* edit);
protected:
    bool eventFilter(QObject*watched,QEvent*event)override;
private:
    void waitPending(bool pending=true);
    void addTipItem();

    std::shared_ptr<QDialog>_find_dlg;
    bool _send_pending;
    QWidget* _search_edit;
    LoadingDlg* _loading_Dlg;
private slots:
    void slot_item_clicked(QListWidgetItem*item);
    void slot_user_search(std::shared_ptr<SearchInfo>s);

signals:
    void sig_jump_chat_item(std::shared_ptr<SearchInfo> si);

};

#endif // SEARCHLIST_H
